using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;

namespace Elev.Core.Utility
{
    public static class DateTools
    {
        static public string FormatDate(DateTime input)
        {
            return input.ToString("dd MMM yyyy", CultureInfo.InvariantCulture);
        }

        static public DateTime FormatDate(string input)
        {
            DateTime dt;
            if (DateTime.TryParse(input, out dt))
                return dt;
            else
                return DateTime.MinValue;
        }
    }
}
